<?php

/**
 * Gère les élements automatiques
 */

namespace Acme\DomotiqueBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity
 * @ORM\Table(name="commande")
 */
class Commande
{
    /**
     * @ORM\Id 
     * @ORM\Column(type="integer") 
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;                  
    /**
     * @ORM\Column(type="string")
     */
    protected $arduino;
    /**
     * @ORM\Column(type="integer")
     */
    protected $pin_id;
    /**
     * @ORM\Column(type="string")
     */
    protected $action_type;
    /**
     * @ORM\Column(type="string")
     */
    protected $action_name;
    /**
     * @ORM\Column(type="integer")
     */
    protected $value;
    /**
     * @ORM\Column(type="boolean")
     */
    protected $done;
    /**
     * @ORM\Column(type="datetime")
     */
    protected $date;


    public function __construct()
    {
        $this->value = 0;
        $this->done = false;
        $this->date = new \DateTime();
    }



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set arduino
     *
     * @param string $arduino
     * @return Commande
     */
    public function setArduino($arduino)
    {
        $this->arduino = $arduino;
    
        return $this;
    }

    /**
     * Get arduino
     *
     * @return string 
     */
    public function getArduino()
    {
        return $this->arduino;
    }

    /**
     * Set pin_id
     *
     * @param integer $pinId
     * @return Commande
     */
    public function setPinId($pinId)
    {
        $this->pin_id = $pinId;
    
        return $this;
    }

    /**
     * Get pin_id
     *
     * @return integer 
     */
    public function getPinId()
    {
        return $this->pin_id;
    }

    /**
     * Set action_name
     *
     * @param string $actionName
     * @return Commande
     */
    public function setActionName($actionName)
    {
        $this->action_name = $actionName;
    
        return $this;
    }

    /**
     * Get action_name
     *
     * @return string 
     */
    public function getActionName()
    {
        return $this->action_name;
    }

    /**
     * Set value
     *
     * @param integer $value
     * @return Commande
     */
    public function setValue($value)
    {
        $this->value = $value;
    
        return $this;
    }

    /**
     * Get value
     *
     * @return integer 
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Set done
     *
     * @param boolean $done
     * @return Commande
     */
    public function setDone($done)
    {
        $this->done = $done;
    
        return $this;
    }

    /**
     * Get done
     *
     * @return boolean 
     */
    public function getDone()
    {
        return $this->done;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Commande
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set action_type
     *
     * @param string $actionType
     * @return Commande
     */
    public function setActionType($actionType)
    {
        $this->action_type = $actionType;
    
        return $this;
    }

    /**
     * Get action_type
     *
     * @return string 
     */
    public function getActionType()
    {
        return $this->action_type;
    }
}